package com.design.pattern.factory.config;

import com.design.pattern.factory.Car;
import com.design.pattern.factory.CarFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

/**
 * @author 王霄
 * @date 2022/3/18 22:13
 */
@Configuration
public class CarConfig {
    @Bean
    public CarFactory carFactory(List<Car> carList) {
        return new CarFactory(carList);
    }
}
